package com.eascs.spider.ant.worker.spider;

import java.text.SimpleDateFormat;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.eascs.spider.ant.common.proj.Task;
import com.eascs.spider.ant.common.util.Downloader;
import com.eascs.spider.ant.worker.manager.TaskManager;
import com.eascs.spider.ant.worker.util.MongoSession;

public abstract class AnotherSpider implements Runnable{

	protected static Logger logger = LoggerFactory.getLogger(AnotherSpider.class);
	
	protected Task task ;
	
	protected TaskManager manager;
	
	protected MongoSession mongoSession;
	
	protected Downloader downloader;
	
	protected SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	
	public AnotherSpider(Task task){
		this.downloader = Downloader.build();
		this.task = task;
		this.manager = TaskManager.getInstance();
		this.mongoSession = MongoSession.getInstance();
	}
	
	@Override
	public abstract void run();
}
